package com.youbug.kefu.dto;

import com.youbug.kefu.entity.Chat;

import javax.websocket.Session;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class AgentSessionInfo extends SessionInfo {
    private volatile String state;
    private Integer max;
    private Map<Long, Chat> holdChats;

    public AgentSessionInfo(String type, Long userId,String userName, Session session, Integer max, String state) {
        super(type, userId, userName, session);
        this.max = max;
        this.state = state;
        this.holdChats = new ConcurrentHashMap<>(max);
    }

    public Map<Long, Chat> getHoldChats() {
        return holdChats;
    }

    public void setHoldChats(Map<Long, Chat> holdChats) {
        this.holdChats = holdChats;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Integer getMax() {
        return max;
    }

    public void setMax(Integer max) {
        this.max = max;
    }
}
